<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>全局组件定义</title>
	</head>
	<body>
		<div id="app">
			<hello1></hello1>

		</div>
		<div id="app2">
			<hello1></hello1>
		</div>
		<template id="helloTem">
			<div>
				<h3>我是组件A</h3>
				数据: {{msg}}

			</div>
		</template>

		<script src="https://cdn.jsdelivr.net/npm/vue@2" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			let hello1 = {
				data() {
					return {
						msg: "我是组件A--hello"
					}
				},

				template: '#helloTem',
				methods: {

				}
			}



			//1.定义vue对象
			const app = new Vue({
				el: '#app',
				components: {
					hello1: hello1
				}

			})
			const app2 = new Vue({
				el: '#app2',

			})
		</script>
	</body>
</html>
